package com.tenement.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 *  实体类。
 *
 * @author BertXie
 * @since 1.0.1
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_menu",dataSource = "tenement")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Generator, value = "snowFlakeId")
    private Long id;

    private String menuName;

    private String url;

    private Short isExternalLink;

    private Short sortOrder;

    private Short status;

    private String permissionCode;

    private Long pId;

    private Long creatorId;

    @Column(onInsertValue = "now()")
    private Timestamp createTime;

    @Column(onUpdateValue = "now()")
    private Timestamp updateTime;

    private Short type;

    private String icon;

    private String component;

    private String name;

    private String remark;

    @Column(ignore = true)
    private List<Menu> children = null;


}
